<template>
  <view>
    <view class="header status_bar" :class="scrrol == true ? 'scrrolHeader' : ''">
    	<view class="back iconfont icon-xiangzuo1" @tap="backPage"></view>
    	<view class="text" :class="scrrol == true ? 'scrrolHeader' : ''">{{pageTitle}}</view>
    </view>	
    <view class="clear_box"></view>

    <view class="content_box">
		<rich-text class="fwb" :nodes="strings"></rich-text>
    </view>

  </view>
</template>

<script>
export default {
  data() {
    return {
		strings: '',
		id:'',
		pageTitle:'',
    };
  },
  onLoad(options) {
		let that = this;
		that.id = options.id;
		if(options.ori){
			that.ori = options.ori;
		}	
		that.loadData();
  },
  methods: {
    backPage() {
		uni.navigateBack({});
    },
    gotopage(e) {
		let url = e.currentTarget.dataset.url;
		uni.navigateTo({
			url: url
		});
    },
    loadData() {
		let that = this;
		that.Net._get('index/art_detail',{article_id:that.id,ori : that.ori}, res => {
			if(res.code == 1){
				let ret = res.data;
				this.pageTitle = ret.title;
				if (that.id > 2){
					this.pageTitle = '通知详情';
				}
				this.time = ret.publish_time;
				this.strings = ret.content;
			}
		});
    },
  }
};
</script>

<style>

.content_box{
	width: 92%;
	margin: auto;
	font-size: 3.5vw;
	line-height: 6vw;
}

.content_box .fwb{
	width: 92%;
	margin: auto;
}
</style>
